Skip to content

Conversation

@plural-copilot
Copy link
Contributor

@plural-copilot plural-copilot bot commented Mar 24, 2025

This PR contains the following updates:

Package Type Update Change
req (source) prod patch 0.5.9 -> 0.5.15

Release Notes

wojtekmach/req (req)

v0.5.15

Compare Source

  • [Req.Response]: Add [Req.Response.to_map/1].

v0.5.14

Compare Source

  • [run_plug]: Remove warning about into: fun with {:halt, acc} result.

    The warning never been particularly useful because it's not like users
    can do anything about it.

v0.5.13

Compare Source

  • [run_plug]: Ease transition to automatically parsing request body.

    Since v0.5.11, this code:

      plug = fn conn ->
        {:ok, body, conn} = Plug.Conn.read_body(conn)
        assert JSON.decode!(body) == %{"x" => 1}
        Plug.Conn.send_resp(conn, 200, "ok")
      end
    
      Req.put!(plug: plug, json: %{x: 1})
    

    Needed to be updated to:

      plug = fn conn ->
        assert conn.body_params == %{"x" => 1}
        Plug.Conn.send_resp(conn, 200, "ok")
      end
    
      Req.put!(plug: plug, json: %{x: 1})
    

    This change makes it so both work. The latter will be required, however.

v0.5.12

Compare Source

  • [run_plug]: Do not raise on unknown content types.

    • [Req.Test]: Improve Req.Test.transport_error/2 error message.

v0.5.11

Compare Source

  • [encode_body]: Fix leading newline before multipart body.

    • [run_finch]: Handle initial transport errors on into: :self.

    • [run_plug]: Automatically parse request body.

      Prior to this change, users would typically write:

      plug = fn conn ->
        {:ok, body, conn} = Plug.Conn.read_body(conn)
        assert JSON.decode!(body) == %{"x" => 1}
        Plug.Conn.send_resp(conn, 200, "ok")
      end
      
      Req.put!(plug: plug, json: %{x: 1})
      

      Now, it can be:

      plug = fn conn ->
        assert conn.params == %{"x" => 1}
        Plug.Conn.send_resp(conn, 200, "ok")
      end
      
      Req.put!(plug: plug, json: %{x: 1})
      

      This is a breaking change as Plug.Conn.read_body will now return "".

      It can be easily fixed by using [Req.Test.raw_body/1] which returns copy of
      the request raw body:

      - {:ok, body, conn} = Plug.Conn.read_body(conn)
      + body = Req.Test.raw_body(conn)

      Furthermore, prior to this change conn.body_params was unfetched:

      plug = fn conn ->
        Plug.Conn.send_resp(conn, 200, inspect(conn.body_params))
      end
      
      iex> Req.post!(json: %{a: 1}, plug: plug).body
      "%Plug.Conn.Unfetched{aspect: :body_params}"
      

      Now it is:

      iex> Req.post!(json: %{a: 1}, plug: plug).body
      "%{\"a\": 1}"
      

      If in your :plug usage you look at conn.params, it will
      now include conn.body_params as Plug always merges them.

    • [retry]: Use jitter by default

    • [Req.Request]: Add [Req.Request.put_option/3].

    • [Req.Request]: Add [Req.Request.put_new_option/3].

    • [Req.Request]: Add [Req.Request.merge_new_options/2].

    • [Req.Test]: Add [Req.Test.redirect/2].

v0.5.10

Compare Source

  • [Req]: Add [Req.get_headers_list/1].

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

@plural-copilot plural-copilot bot added backend Changes related to the backend dependencies Pull requests that update a dependency file labels Mar 24, 2025
@plural-copilot plural-copilot bot force-pushed the renovate/backend/req-0.5.x-lockfile branch 14 times, most recently from 492ae98 to f35b44a Compare March 30, 2025 01:16
@plural-copilot plural-copilot bot force-pushed the renovate/backend/req-0.5.x-lockfile branch 12 times, most recently from 329631f to 6362e29 Compare April 7, 2025 21:28
@plural-copilot plural-copilot bot force-pushed the renovate/backend/req-0.5.x-lockfile branch 2 times, most recently from 15bf260 to a930aab Compare April 8, 2025 15:44
@plural-copilot plural-copilot bot force-pushed the renovate/backend/req-0.5.x-lockfile branch 12 times, most recently from 5edeb0e to 40af40a Compare July 14, 2025 11:49
@plural-copilot plural-copilot bot changed the title chore(backend): update dependency req to v0.5.14 chore(backend): update dependency req to v0.5.15 Jul 14, 2025
@plural-copilot plural-copilot bot force-pushed the renovate/backend/req-0.5.x-lockfile branch 14 times, most recently from d6f1fcf to 2c6a58f Compare July 21, 2025 16:38
@plural-copilot plural-copilot bot force-pushed the renovate/backend/req-0.5.x-lockfile branch from 2c6a58f to fa66877 Compare July 21, 2025 23:44
@plural-copilot plural-copilot bot force-pushed the renovate/backend/req-0.5.x-lockfile branch from fa66877 to 87e1e5b Compare July 22, 2025 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Changes related to the backend dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant